<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2619. 数组原型对象的最后一个元素</title>
</head>

<body>

</body>

<script>
    /**
     * @return {null|boolean|number|string|Array|Object}
     */
    Array.prototype.last = function () {
        return this.length ? this[this.length - 1] : -1;
    };
</script>

</html>